package com.snoopy.cloud.controller;

import com.alibaba.fastjson2.JSON;
import com.snoopy.cloud.entity.Account;
import com.snoopy.cloud.entity.AccountDTO;
import com.snoopy.cloud.service.AccountService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author snoopy23
 * @date 2024/6/27
 */
@RestController
@RequestMapping("/payment")
public class PaymentController {

    @Resource
    private AccountService accountService;

    @RequestMapping("hello")
    @ResponseBody
    public Object hello(AccountDTO accountDTO){

        List<Account> list = accountService.list(accountDTO);
        return "hello payment："+ JSON.toJSONString(list);
    }
}
